<template>
  <div class="app-container">
    <el-scrollbar style="height: 100%;">
      <div class="echarts-item">
        <div class="echarts-title">
          {{ echartsData.ssh.title }}
        </div>
        <el-row :gutter="15" class="echarts-row" style="height: 430px;">
          <el-col :span="24">
            <line-bar :echartsData="echartsData.ssh"></line-bar>
          </el-col>
        </el-row>
      </div>
    </el-scrollbar>
  </div>
</template>

<script>
  import LineBar from '@/components/echarts/LineBar'
  export default {
    mounted() {
      this.$store.commit('rdefaultActive', 'sszl')
    },
    components: {
      LineBar,
    },
    data() {
      return {
        n: 2,
        echartsData: {
          ssh: {
            title: '原水水量环比同比分析',
            dataset: [
              ['product', '2018-04', '2018-05', '2018-06', '2018-07', '2018-08', '2018-09', '2018-10', '2018-11', '2018-12', '2019-01', '2019-02', '2019-03', '2019-04'],
              ['区域供水量', 942.49,958.95,903.47,945.25,921.77,956.36,941.66,906.3,912.69,894.57,889.08,953.27,973.62],
              ['区域售水量', 881.59,926.27,871.57,913.31,876.67,921.22,876.6,840.93,875.3,873.47,830.02,929.16,922.71],
              ['产销差', -60.9,-32.68,-31.9,-31.94,-45.1,-35.14,-65.06,-65.37,-37.39,-21.1,-59.06,-24.11,-50.91],
            ],
            unitName: ['km³', '%'],
            yAxis: [
              {
                name: '水损耗(kw/m³)',
                formatter: '{value}'
              }
            ]
          }
        }
      }
    },
    methods: {}
  }
</script>

<style scoped>

</style>
